package com.shadowtorcher.stdisk.bean;

import com.shadowtorcher.soulknife.DataSupport;
import com.shadowtorcher.soulknife.exception.BeanConfigErrorException;
import com.shadowtorcher.stdisk.util.StaticUtils;

import java.sql.SQLException;
import java.util.Date;

public class LogicFileBean extends DataSupport {

    //    private static int isPublic = 1;
    //    private static int notPublic = 0;
    //    只能放到逻辑层了...

    private String LogicFileID; // 主键
    private String PhysicsFileID;      // 外键
    private String UserID;      // 外键
    private String LogicFileName;
    private String LogicPath;
    private int Public;
    private Date CreationDate;
    private Date ModifiDate;

    @Override
    public void save() throws BeanConfigErrorException, SQLException {
        if (this.LogicFileID == null) {
            this.LogicFileID = StaticUtils.generatorStringUUID();
        }
        super.save();
    }

    public int getPublic() {
        return Public;
    }

    public void setPublic(int isPublic) {
        this.Public = isPublic;
    }

    public String getLogicFileID() {
        return LogicFileID;
    }

    public void setLogicFileID(String logicFileID) {
        LogicFileID = logicFileID;
    }

    public String getPhysicsFileID() {
        return PhysicsFileID;
    }

    public void setPhysicsFileID(String physicsFileID) {
        PhysicsFileID = physicsFileID;
    }

    public String getUserID() {
        return UserID;
    }

    public void setUserID(String userID) {
        UserID = userID;
    }

    public String getLogicFileName() {
        return LogicFileName;
    }

    public void setLogicFileName(String logicFileName) {
        LogicFileName = logicFileName;
    }

    public String getLogicPath() {
        return LogicPath;
    }

    public void setLogicPath(String logicPath) {
        LogicPath = logicPath;
    }

    public Date getCreationDate() {
        return CreationDate;
    }

    public void setCreationDate(Date creationDate) {
        CreationDate = creationDate;
    }

    public Date getModifiDate() {
        return ModifiDate;
    }

    public void setModifiDate(Date modifiDate) {
        ModifiDate = modifiDate;
    }
}
